package com.ygqh.baby.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.KsdStock;
import com.ygqh.baby.po.KsdStockExample;
import com.ygqh.baby.po.YgProduct;
import com.ygqh.baby.po.YgSku;
import com.ygqh.baby.po.YgStock;

public interface KsdStockMapper {
	int countByExample(KsdStockExample example);

	int deleteByExample(KsdStockExample example);

	int deleteByPrimaryKey(Long id);

	int insert(KsdStock record);

	int insertSelective(KsdStock record);

	List<KsdStock> selectByExample(KsdStockExample example);

	KsdStock selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") KsdStock record, @Param("example") KsdStockExample example);

	int updateByExample(@Param("record") KsdStock record, @Param("example") KsdStockExample example);

	int updateByPrimaryKeySelective(KsdStock record);

	int updateByPrimaryKey(KsdStock record);

	int countSuper(@Param("q") String q);

	List<KsdStock> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	List<KsdStock> selectStockBySkuCode(@Param("skuCodes") List<String> skuCodes, @Param("supplierId") Long supplerId);

	int updateStockBatch(@Param("stockList") List<KsdStock> stockList);

	List<YgStock> selectSuper(@Param("queryInfo")QueryInfo queryInfo, @Param("q")String q,@Param("groupId") Long groupId,
			@Param("productName") String productName, @Param("productCode")String productCode, @Param("skuCode") String skuCode, @Param("amount") Long amount);

	int countSuper(@Param("q")String q,@Param("groupId") Long groupId,
			@Param("productName") String productName, @Param("productCode")String productCode, @Param("skuCode") String skuCode, @Param("amount") Long amount);

	void updateStockBySkuList(@Param("list")List<YgStock> list, @Param("supplierId")Long supplierId);

	List<YgSku> findByProductId(@Param("productId") Long productId);

}
